<!DOCTYPE html>
<html>
    <head>
        <title><g:layoutTitle default="Grails" /></title>
        <link rel="stylesheet" href="${resource(dir:'css',file:'main.css')}" />
        <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
        <g:layoutHead />
        <g:javascript library="application" />
        <g:javascript src="custom.js"/>
    </head>
    <body>
    	<!--
        <div id="spinner" class="spinner" style="display:none;">
            <img src="${resource(dir:'images',file:'spinner.gif')}" alt="${message(code:'spinner.alt',default:'Loading...')}" />
        </div>
        <div id="grailsLogo"><a href="http://grails.org"><img src="${resource(dir:'images',file:'grails_logo.png')}" alt="Grails" border="0" /></a></div>
         -->
         <div>FAMILYTHEK LOGO</div>
         <div>
			<g:if test="${session?.user!=null}">
				<a href="javascript:toggleUserMenu()">Usermenu</a>
		         <div id="usermenu" style="display:none">
        		 	<a href="/${grailsApplication.metadata['app.name']}/recordingRequest/create">Request</a>, Recordings, <a href="/${grailsApplication.metadata['app.name']}/recordingRequest/showPending">Pending</a>, <a href="/${grailsApplication.metadata['app.name']}/recordingRequest/showGranted">Granted</a>, <a href="/${grailsApplication.metadata['app.name']}/recordingRequest/showDenied">Denied</a>, <a href="/${grailsApplication.metadata['app.name']}/user/edit/${session.user.id}">Edit profile</a>
         		</div>
				<g:if test="${session?.admin}">
					, <a href="javascript:toggleAdminMenu()">Adminmenu</a>
			         <div id="adminmenu" style="display:none">
	        			 <a href="/${grailsApplication.metadata['app.name']}/recordingRequestAdmin/showPending">Show requests</a>, <a href="/${grailsApplication.metadata['app.name']}/recording/list">show available recordings</a>, <a href="/${grailsApplication.metadata['app.name']}/user/list">show users</a>, <a href="/${grailsApplication.metadata['app.name']}/userGroup/list">user groups</a>
	         		</div>
				</g:if>
				<a href="/${grailsApplication.metadata['app.name']}/user/logout">Logout</a>
			</g:if>
			<g:else>
				<a href="/${grailsApplication.metadata['app.name']}/user/login">Login</a>,  <a href="/${grailsApplication.metadata['app.name']}/user/register">Register</a>
			</g:else>
         </div>
         <g:copyright/>
        <g:layoutBody />
    </body>
</html>